pkgname=cemu
pkgver=2.0
pkgrel=0
pkgdesc='TI-84 Plus CE / TI-83 Premium CE emulator.'
arch=('i686' 'x86_64')
url='https://github.com/CE-Programming/CEmu'
conflicts=('cemu')
license=()
depends=()
makedepends=('qt5-declarative')
source=("$pkgname-$pkgver.tar.xz")
md5sums=('SKIP')

build() {
  # Compile...
  cd "${srcdir}/${pkgname}-${pkgver}"
  cd gui/qt/capture/libpng-apng && autoreconf -vif && ./configure --with-libpng-prefix=a --enable-static --disable-shared CFLAGS="-O2 -fPIC" && make libpng16.la && cd ../../../..
  mkdir -p build
  cd build
  qmake ../gui/qt/CEmu.pro CEMU_VERSION=v2.0 USE_LIBPNG=internal TARGET_NAME=cemu
  make -j4
}

package() {
  # Install...
  cd "${srcdir}/${pkgname}-${pkgver}/build"
  INSTALL_ROOT="${pkgdir}" make install
}

